Electric motor mode control

ABSTRACT

A vehicle includes one or more inverter-fed electric machines such as permanent magnet synchronous motors. A controller operates an inverter in either six-step mode or PWM mode depending upon motor speed, motor torque, and the inverter input voltage. A method of selecting the operating mode may determine a transition threshold based on the ratio of rotor speed to inverter input voltage, reducing the approximation error associated with multi-dimensional lookup tables. When the speed and voltage vary while maintaining a constant ratio and constant torque, the transition threshold does not change. Consequently, the controller remains in the same mode.

TECHNICAL FIELD

This disclosure relates to control of electric motors.

BACKGROUND

Permanent magnet synchronous motors (PMSMs) are utilized in variousapplications because they have generally favorable efficiencycharacteristics relative to other types of motors. Typically, PMSMs havethree separate electrical windings within the stator which are eachpowered by alternating current (AC) voltages V_(a), V_(b), and V_(c). Inoperation, the winding currents I_(a), I_(b), and I_(c) each oscillateat a frequency proportional to the rotor speed and are separated by 120degrees in phase from one another. These winding currents induce arotating magnetic field which may be out of phase with the rotor. Theresulting shaft torque depends upon both the magnitude of the magneticfield and the phase angle relative to the rotor.

For convenience, the winding voltages and currents may be represented byvectors with respect to a rotating reference frame that rotates with therotor. The mapping between rotor position and the rotating referenceframe depends upon the number of poles in the motor. The voltage vectorhas a direct component V_(d) and a quadrature component V_(q).Similarly, the current has a direct component I_(d) and a quadraturecomponent I_(q). V_(d), V_(q), I_(d), and I_(q) do not oscillate basedon rotor position.

In certain applications, such as electric vehicles and hybrid electricvehicles, electrical power is available from a non-oscillating directcurrent (DC) voltage source such as a battery. Therefore, inverters areutilized to convert the non-oscillating voltage V_(dc) into threeoscillating voltages. Inverters contain a discrete number of switchingdevices and are therefore capable of supplying only a discrete number ofvoltage levels at each of the three motor terminals. For a 2-levelinverter, at any moment in time, the switching devices are set toelectrically connect each of the three AC motor terminals to either thepositive or the negative DC terminal. Thus, eight switching states areavailable. Two of these switching states, in which all three ACterminals are connected to the same DC terminal, are called zero states.In the remaining six states, one AC terminal is connected to one of theDC terminals and the other two AC terminals are connected to theopposite DC terminal. The inverter is capable of switching rapidly amongthese eight states.

Some general characteristics of typical inverter-fed PMSMs areillustrated in FIG. 1. In this Figure, the horizontal axis representsrotor speed and the vertical axis represents rotor torque. The operatingregion depends upon the DC voltage V_(dc). The positive speed, positivetorque operating region at a reference DC voltage may be bounded asillustrated by solid lines 110, 112, and 114. At low speeds, the maximumavailable torque may be limited by a maximum winding current asindicated by line 110. Line 112 indicates a maximum available torque athigher speeds which is limited by the voltage. At point 116, called thecorner point, both current and voltage are at their respective maximums.Dotted line 118 indicates the corresponding limit at a higher DC voltageabove the reference DC voltage. Line 114 indicates an overall maximumrated speed.

PMSMs may generate either positive or negative torque and may rotate ineither positive or negative directions. In the positive speed, negativetorque quadrant, a PMSM acts as a generator converting mechanical energyinto electrical energy. In this quadrant, the characteristics aresimilar to that shown in FIG. 1, although the minimum torque curvecorresponding to the voltage limit may not be a minor image of line 112.The negative speed region closely tracks the positive speed regionrotated 180 degrees about the origin.

FIG. 2 illustrates typical characteristics of an inverter-fed PMSM withrespect to the winding current in the rotor reference frame. In thisFigure, the direct component I_(d) is represented by the horizontal axisand the quadrature component I_(q) is represented by the vertical axis.Curve 210 represents different combinations of I_(d) and I_(q) thatwould produce a particular output torque. Curves 212, 214, and 216represent the combinations for progressively higher output torques.Although every point along each of these curves produces the same outputtorque, some combinations will be associated with higher losses thanothers. Line 218 represents the most efficient operating point for eachlevel of torque. However, it is not always possible to operate at thiscondition. Point 220 represents the current that would be induced in thewindings by the permanent magnets in the rotor as the rotor spins at aparticular speed. The voltage applied by the inverter alters the windingcurrent from this condition. Curve 222 represents the boundary of theconditions that are achievable by the inverter at a particular rotorspeed and bus voltage level. At higher bus voltages or lower rotorspeeds, the boundary expands as shown by dashed curve 224.

Two basic control methods are known for switching among inverter statesto regulate torque output of a PMSM. In the six-step method, theinverter cycles through the six non-zero states once per cycle of therotor, producing an oscillating voltage and current in each winding. Arotor cycle is defined relative to motor poles and does not necessarilycorrespond to a complete revolution. The amplitude of the AC voltage isdictated by the DC voltage. The torque is dictated by the DC voltage,the rotor speed, and the phase difference between these quasi-sinusoidalAC voltage signals and the rotor position. A controller issues commandsto the inverter indicating when to switch to the next state in thesequence. In the PWM method, the inverter switches very rapidly amongtwo of the non-zero states and one of the zero states. A controllerspecifies what fraction of the time should be spent in each of thesethree states by specifying pulse width modulation (PWM) duty cycles. Thecontroller updates these duty cycles at regular intervals such that thefrequency of updates is significantly higher than the frequency of therotor rotation.

SUMMARY OF THE DISCLOSURE

In one embodiment, a method of operating an inverter is disclosed. Theinverter is connected to an electrical bus and to an electric machinesuch as a permanent magnet synchronous motor. The method computes anormalized speed by dividing a rotor speed of the electric machine by avoltage of the electrical bus. A transition threshold is computed basedon the normalized speed. PWM mode is selected if a torque request isless than the transition threshold. If the torque request exceeds thetransition threshold, six-step mode is selected. In some embodiments, asecond transition threshold, with a negative value, may be computedbased on normalized speed. Six-step mode may be selected if the torquerequest is less than this second transition threshold.

In another embodiment, a vehicle includes an electric machine such as apermanent magnet synchronous motor, an inverter, and a controller. Thecontroller is configured to maintain operation in PWM mode while thespeed of the electric machine and the input voltage of the inverter varyaccording to a fixed ratio and the electric machine torque is constant.When the operating point is near a transition boundary, the controllermay be configured to transition from PWM mode to six-step mode inresponse to either an increase in speed or a decrease in voltage whilemaintaining the torque. The controller may also be configured tomaintain operation in six-step mode while the speed of the electricmachine and the input voltage of the inverter vary according to thefixed ratio and the electric machine torque is constant at a differentlevel. When the operating point is near a transition boundary, thecontroller may be configured to transition from six-step mode to PWMmode in response to either a decrease in speed or an increase in voltagewhile maintaining the torque. In some embodiments, the input voltage ofthe inverter may be regulated by a dc-to-dc converter which establishesa bus voltage distinct from the voltage of a battery.

In another embodiment, a controller includes an input interface, anoutput interface, and control logic. The input interface receivessignals indicating a voltage of an electrical bus and a speed of anelectric machine. The output interface transmits inverter state and dutycycle commands to an inverter. The inverter, in turn, supplies currentto the electric machine resulting in a torque. The control logic isprogrammed to operate the inverter in PWM mode at a given torque, speed,and voltage. If the torque request is constant and speed and voltageincrease proportionately, the control logic is programmed to stay in PWMmode. However, for some combinations of speed, torque, and voltage, thecontroller is programmed to transition from PWM mode to six-step mode inresponse to any increase in speed or decrease in voltage whilemaintaining the torque. While operating in six-step mode at constanttorque, the control logic may be programmed to stay in six-step mode asthe speed and voltage decrease proportionately. However, for somecombinations of speed, torque, and voltage, the controller is programmedto transition from six-step mode to PWM mode in response to any decreasein speed or increase in voltage while maintaining the torque. In someembodiments, the torque at which the controller transitions from PWMmode to six-step mode for a particular speed and voltage may be higherthan the torque at which the controller transitions from six-step modeto PWM mode at the same speed and voltage.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a graph of general characteristics of permanent magnetsynchronous motors in terms of rotor speed and rotor torque;

FIG. 2 is a graph of general characteristics of permanent magnetsynchronous motors in terms of the direct and quadrature components ofthe winding current;

FIG. 3 is a schematic diagram of an exemplary hybrid electricpowertrain;

FIG. 4 is a controller schematic in an exemplary hybrid electricpowertrain;

FIG. 5 is a flow chart for the control method for permanent magnetsynchronous motors;

FIG. 6 is a flow chart for determining which control algorithm, six-stepor PWM, should be utilized to set the motor torque;

FIG. 7 is a flow chart for determining inverter state using six-stepcontrol; and

FIG. 8 is a flow chart for determining inverter states and duty cyclesusing PWM control.

DETAILED DESCRIPTION

Embodiments of the present disclosure are described herein. It is to beunderstood, however, that the disclosed embodiments are merely examplesand other embodiments can take various and alternative forms. Thefigures are not necessarily to scale; some features could be exaggeratedor minimized to show details of particular components. Therefore,specific structural and functional details disclosed herein are not tobe interpreted as limiting, but merely as a representative basis forteaching one skilled in the art to variously employ the presentinvention. As those of ordinary skill in the art will understand,various features illustrated and described with reference to any one ofthe figures can be combined with features illustrated in one or moreother figures to produce embodiments that are not explicitly illustratedor described. The combinations of features illustrated providerepresentative embodiments for typical applications. Variouscombinations and modifications of the features consistent with theteachings of this disclosure, however, could be desired for particularapplications or implementations.

A schematic diagram of an exemplary hybrid electric powertrain isillustrated in FIG. 3. However, the claimed invention is not limited tothis powertrain topology. Internal combustion engine 310 drives carrier312 of planetary gear set 314. The engine torque is divided by gear set314 between sun gear 316 and ring gear 318. The ring gear torque istransmitted mechanically to output shaft 320. The sun gear torque isabsorbed by generator 322. Motor 324 is driveably connected to outputshaft 320. Throughout this description, the terms generator and motorare used merely as labels to identify these components. Both generator322 and motor 324 are reversible electrical machines capable of bothconverting mechanical shaft power into electrical power and convertingelectrical power into mechanical shaft power. Control methods aredescribed with respect to the motor but are equally applicable to thegenerator. The driveshaft is driveably connected to a differential 326which divides the power between left and right wheels 328 while allowingslight differences in wheel speeds. Electrical power connections areillustrated by dashed lines with long dashes. Generator 322 and motor324 are electrically powered by inverters 330 and 332 respectively viathree phase power circuits. Inverters 330 and 332 draw power from orsupply power to DC electrical bus 334. Electrical power is stored inbattery 336. DC to DC Converter 338 converts the voltage level ofbattery 336 to the voltage level of DC bus 334. The DC bus voltage maybe either higher or lower than the battery voltage. Control signalconnections are illustrated by dashed lines with short dashes.Controller 340 issues control signals to DC to DC converter 338specifying the desired voltage for the DC electrical bus 334. Controller340 also issues control commands to engine 310 and inverters 330 and 332to regulate the torque generated by the engine, generator 322, and motor324 respectively. If the torque actually delivered by motor 324 differssignificantly from the requested torque, then vehicle acceleration willnot match the driver's expectation. If the torque actually delivered bygenerator 322 differs significantly from the requested torque, thenengine speed will depart from expected behavior.

Controller 340 is illustrated schematically in more detail in FIG. 4.Vehicle system controller 410 receives signals indicating vehicle speed,the position of the accelerator pedal and brake pedal, and various othervehicle data. Based on this data, the vehicle system controllerdetermines a target DC bus voltage and a target output shaft torque andissues torque requests T_(req) _(—) _(eng) to engine controller 412,T_(req) _(—) _(gen) to generator controller 414, and T_(req) _(—) _(mot)to motor controller 416. The output of generator controller 414 andmotor controller 416 are switch states for switches within inverters 330and 332 respectively. These controllers receive input signals indicatingthe angular position of the corresponding rotor, labeled Θ_(R), thevoltage of DC bus 334, labeled V_(dc), and the current in each winding,labeled I_(a), I_(b), and I_(c). Variable Voltage Controller 418 issuescommands to DC to DC converter 338 to effectuate the target bus voltage.Controllers 410, 412, 414, 416, and 418 may be implemented as a singlemicro-controller or as multiple communicating controllers.

FIG. 5 illustrates the computations for each update. At 510, thecontroller computes a normalized speed, ω_(Norm), by dividing the rotorspeed by the bus voltage. At 512, the controller adjusts the torquerequest from the vehicle system controller if necessary to ensure thatthe requested torque is within the motor operating region for thecurrent rotor speed and bus voltage. At 514, the controller selectsbetween PWM and six-step control methods based on the adjusted torquerequest and the normalized speed. If the six-step mode is selected, thecontroller computes inverter commands at 516 based on the six-stepmethod. If the PWM mode is selected, the controller computes invertercommands at 518 based on the PWM method.

The six-step method is preferred when the torque demand and rotor speedare high and the DC bus voltage is low. The PWM method is preferred forlow torque demand, low rotor speed, high bus voltage conditions. Line120 in FIG. 1 indicates an exemplary boundary between these regions at aparticular reference voltage. The six-step method is preferred in theregion to the upper right of line 120 while the PWM method is preferredin the region to the lower left. Dotted line 122 shows how this boundaryshifts when the bus voltage is increased.

Controllers commonly use lookup tables to represent non-linear functionssuch as the boundary between the six-step region and the PWM region.Since the transition torque is a function of both the rotor speed ω andthe bus voltage V_(dc), a multi-dimensional look-up table, such as Table1, would typically be used. If either of the independent variables, inthis case rotor speed ω and bus voltage V_(dc), fall between thetabulated values, the controller may select one of the neighboringvalues or interpolate between them. For a non-linear function,interpolation introduces some error relative to the underlying function.Typically, lookup tables are populated during vehicle calibration basedon experimental data. Populating the table requires experimentation at avariety of voltage levels. Using a large number of different voltagelevels reduces the approximation error but increases the effort requiredto populate the tables, the memory in the controller consumed by thetables, and the time required to look up a value.

TABLE 1 V₁ V₂ V₃ V_(m) ω₁ T₁₁ T₁₂ T₁₃ T_(1m) ω₂ T₂₁ T₂₂ T₂₃ T_(2m) ω₃T₃₁ T₃₂ T₃₃ T_(3m) ω₄ T₄₁ T₄₂ T₄₃ T_(4m) ω_(n) T_(n1) T_(n2) T_(n3)T_(nm)

An alternative to using a multi-dimensional look-up table is to use thesingle independent variable ω_(Norm) as calculated at 510 in FIG. 5.Table 2 illustrates a table of transition torque vs. normalized speed.Using a table with a single independent variable reduces theapproximation error and the calibration effort. The single independentvariable look-up table may be used to improve PMSM performance whilereducing the controller memory used.

TABLE 2 ω_(Norm)_1 T₁ ω_(Norm)_2 T₂ ω_(Norm)_3 T₃ ω_(Norm)_4 T₄ω_(Norm)_5 T₅ ω_(Norm)_n T_(n)

FIG. 6 illustrates a method used at 514 in FIG. 5 to determine whichcontrol algorithm, six-step or PWM, should be utilized to set the motortorque. Calibration tables store two functions of normalized speed,ω_(Norm). The first table, T_(lo) _(—) _(pos), is slightly below theideal transition torque while the second table, T_(hi) _(—) _(pos), isslightly above the ideal transition torque. The mode changes fromsix-step to PWM when the operating point changes from above T_(lo) _(—)_(pos) to below T_(lo) _(—) _(pos). Similarly, the mode changes from PWMto six-step when the operating point changes from below T_(hi) _(—)_(pos) to below T_(hi) _(—) _(pos). If the operating point is betweenthese two functions, the mode remains the same as the previous timestep. This hysteresis avoids mode changes based on small changes inoperating point when operating near the boundary. Similar tables, T_(lo)_(—) _(neg) and T_(hi) _(—) _(neg), characterize the mode boundary inthe negative torque operating region. The negative speed region isaccommodated by using a surrogate torque request T_(ref) which is setequal to T_(req) _(—) _(adj) at 610 when the rotor speed is positive and−T_(req) _(—) _(adj) at 612 when the rotor speed is negative. If thecontroller was operating in six-step mode during the previous update,then it looks up the values at the current normalized speed at 614. At616, the controller determines whether the operating point has movedinto the region between the positive and negative torque boundaries. Ifso, it transitions to PWM mode, otherwise, it remains in six-step mode.If the controller was previously operating in PWM mode, it looks up thevalues at the current normalized speed at 618. At 620, the controllerdetermines whether the operating point has moved outside the regionbetween the positive and negative torque boundaries. If so, ittransitions to six-step mode, otherwise, it remains in PWM mode.

When a multi-dimensional table is used, if the rotor speed and busvoltage vary, the mode transition thresholds will vary even if the ratioof rotor speed to bus voltage remains constant. Consequently, modetransition will sometimes occur as speed and voltage vary at a constantratio and the torque request remains constant. When the method of FIG. 6is used, if the rotor speed and bus voltage vary while maintaining aconstant ratio of rotor speed to bus voltage, the mode transitionthresholds will remain constant. Therefore, at a constant torque requestand constant ratio of speed to voltage, no mode transitions will occur.

In six-step mode, the components of the winding current, I_(d), andI_(q), are located on a curve such as curve 222 or 224 in FIG. 2. Thecurve is determined by the bus voltage V_(dc) and the rotor speed w. Theposition along the curve is determined by the voltage angle, Θ_(V). Thecontroller adjusts Θ_(V) by adjusting the timing at which it switchesthe inverter to the next non-zero inverter states. The target voltageangle Θ*_(V) is a non-linear function of the adjusted torque request,rotor speed, and bus voltage. Typically, a non-linear function ofmultiple parameters is represented in a controller by amulti-dimensional table. When the actual value of the independentparameters fall between the tabulated values, the controller can use thehigher value, use the lower value, or interpolate between them. Each ofthese choices introduces error in Θ*_(V) which results in the motortorque departing from the adjusted torque request. For example, if therotor speed and bus voltage vary while maintaining a constant ratio ofrotor speed to bus voltage, Θ*_(V) and the motor torque output willvary.

FIG. 7 illustrates a method of computing Θ*_(V) using a table with onlytwo independent parameters, the adjusted torque request and thenormalized speed, ω_(Norm). This table is populated during calibrationbased on testing to characterize the motor. The testing duringcalibration may occur at bus voltages that differ from the current busvoltage. For positive rotor speeds, the target voltage angle isdetermined at 710 with a single table lookup. For negative rotor speeds,the controller relies on the symmetry of motor behavior by looking up atarget voltage angle for a corresponding positive speed operating pointat 712 and adjusting it for the negative speed operating point at 714.Due to the critical timing of the state switching, the switching isperformed by functions that respond to interrupts. A first interruptoccurs at 716 whenever the rotor passes a reference position. At 718, aninterrupt handler computes the time at which the state change shouldoccur based on Θ*_(V) and the rotor speed ω and sets a timer. A secondinterrupt occurs at 720 when this timer expires. At 722, an interrupthandler issues a command to the inverter to switch to the next non-zerostate. When the method of FIG. 7 is used, if the rotor speed and busvoltage vary while maintaining a constant ratio of rotor speed to busvoltage, Θ*_(V) will remain constant.

In PWM mode, the components of the winding current, I_(d), and I_(q),are located in a region bounded by a curve such as curve 222 or 224 inFIG. 2. As with the six-step method, the curve is determined by the busvoltage V_(dc) and the rotor speed w, although the curve may be slightlyinside the six-step curve for a particular V_(dc) and ω. The controlleradjusts I_(d) and I_(q) by adjusting V_(d) and V_(q) using closed loopcontrol. The controller then translates V_(d) and V_(q) into PWM dutycycle commands to the inverter based on the rotor position Θ_(R).

The target components of the winding current, I*_(d), and I*_(q), arenon-linear functions of the adjusted torque request, rotor speed, andbus voltage. At low torque requests, low speeds, and high bus voltages,I*_(d) and I*_(q) are selected along the line 218 in FIG. 2 to yield themost efficient operation. In this region, I*_(d) and I*_(q) are notsensitive to small changes in bus voltage or rotor speed. However, athigh torque requests, high speeds, and low bus voltages, operation alongline 218 is not possible. The most efficient achievable operating pointis located along a curve, such as 222, which represents the boundary ofthe operating region at the current rotor speed and bus voltage. Thisarea of operation is called the field weakening region. In the fieldweakening region, I*_(d) and I*_(q) are both sensitive to changes in busvoltage or rotor speed. Furthermore, the relationship between I*_(d) andI*_(q) is important.

As with voltage angle, I*_(d) and I*_(q) would typically be representedin a controller by a multi-dimensional table. When the actual value ofthe bus voltage falls between tabulated values, the conservativeapproach would be to use the lower tabulated value. This would result ina combination of I*_(d) and I*_(q) that produce the requested torque butfall well inside the region bounded curve 222 and therefore result inless efficient operation. If interpolation is used, the resultingcombination of I*_(d) and I*_(q) may not produce the requested torque.Furthermore, it may be necessary to calibrate the tables conservativelyin order to ensure that the resulting points fall within curve 222,resulting in compromised efficiency. In either approach, if the rotorspeed and bus voltage vary while maintaining a constant ratio of rotorspeed to bus voltage, I*_(d) and I*_(q) will vary.

FIG. 8 illustrates a method of computing I*_(d) and I*_(q) using tableswith only two independent parameters, the adjusted torque request andthe normalized speed, ω_(Norm). For positive rotor speeds, thecontroller looks up I_(q)* and I_(d)* in the tables at 810. For negativerotor speeds, the controller looks up the values at 812 based on anopposite direction torque and then changes the sign of I_(q)* at 814.Next, the controller computes voltages in the rotor reference frame,V_(d) and V_(q), using closed loop control with measured values of I_(d)and I_(q) as feedback signals at 816. When the magnitude of the vectorsum of V_(d) and V_(q) is near V_(dc), over-modulation at 818 may benecessary in order to deliver the requested torque. At 820, V_(d) andV_(q) are translated in the stationary reference frame based on therotor position, Θ_(R). Each of the six non-zero inverter statescorresponds to a vector in the stationary reference frame. These vectorsseparate the space into six 60° sectors. At 822, the controller selectsthe two non-zero inverter states corresponding to the two vectors thatbound the translated V_(d), V_(q) voltage vector. Then, it computes twoduty cycles such that the sum of the two vectors weighted by therespective duty cycles is equal to the translated V_(d), V_(q) voltagevector.

While exemplary embodiments are described above, it is not intended thatthese embodiments describe all possible forms encompassed by the claims.The words used in the specification are words of description rather thanlimitation, and it is understood that various changes can be madewithout departing from the spirit and scope of the disclosure. Aspreviously described, the features of various embodiments can becombined to form further embodiments of the invention that may not beexplicitly described or illustrated. While various embodiments couldhave been described as providing advantages or being preferred overother embodiments or prior art implementations with respect to one ormore desired characteristics, those of ordinary skill in the artrecognize that one or more features or characteristics can becompromised to achieve desired overall system attributes, which dependon the specific application and implementation. These attributes caninclude, but are not limited to cost, strength, durability, life cyclecost, marketability, appearance, packaging, size, serviceability,weight, manufacturability, ease of assembly, etc. As such, embodimentsdescribed as less desirable than other embodiments or prior artimplementations with respect to one or more characteristics are notoutside the scope of the disclosure and can be desirable for particularapplications.

What is claimed is:
 1. A vehicle comprising: an electric machine; aninverter; and a controller configured to operate the electric machine inpulse width modulation mode at a speed and torque of the machine and aninput voltage of the inverter, the speed and the voltage related by aratio, and maintain operation in pulse width modulation mode as speedand voltage increase proportionately according to the ratio whilemaintaining the torque.
 2. The vehicle of claim 1 wherein the controlleris further configured to transition from pulse width modulation mode tosix-step mode in response to any increase in speed while maintaining thevoltage and torque.
 3. The vehicle of claim 2 wherein the controller isfurther configured to transition from pulse width modulation mode tosix-step mode in response to any decrease in voltage while maintainingthe speed and torque.
 4. The vehicle of claim 3 wherein the controlleris further configured to: operate the electric machine in six-step modeat the speed and voltage such that the electric machine produces asecond torque; and maintain operation in six-step mode as speed andvoltage decrease proportionately according to the ratio whilemaintaining the second torque.
 5. The vehicle of claim 4 wherein thecontroller is further configured to transition from six-step mode topulse width modulation mode in response to any decrease in speed whilemaintaining voltage and second torque.
 6. The vehicle of claim 5 whereinthe controller is further configured to transition from six-step mode topulse width modulation mode in response to any increase in voltage whilemaintaining the speed and second given torque.
 7. The vehicle of claim 1further comprising: a battery; and a dc-to-dc converter electricallyconnected to both the battery and the inverter.
 8. A method of operatingan inverter connected to a bus having a voltage and also connected to anelectric machine having a rotor speed, the method comprising: receivinga torque request; computing a normalized speed by dividing the rotorspeed by the voltage; computing a first transition threshold based onthe normalized speed; operating the inverter in pulse width modulationmode if the torque request is less than the first transition threshold;and operating the inverter in six-step mode if the torque request isgreater than the first transition threshold.
 9. The method of claim 8further comprising: computing a second transition threshold based onnormalized speed, the second transition threshold being less than zero;and operating the inverter in six-step mode if the torque request isless than the second transition threshold.
 10. A controller comprising:an input interface configured to receive signals indicating a voltage ofan electrical bus and a speed of an electric machine; an outputinterface configured to transmit inverter state and duty cycle commandsto an inverter such that the inverter supplies current to the electricmachine resulting in a torque; and control logic programmed to operatethe inverter in pulse width modulation mode at a given speed, givenvoltage, and first given torque, the given speed and given voltagerelated by a ratio, maintain operation in pulse width modulation mode asspeed and voltage increase proportionately from the given speed andgiven voltage according to the ratio while maintaining the first giventorque, and transition from pulse width modulation mode to six-step modein response to any increase in speed from the given speed whilemaintaining the first given torque and given voltage.
 11. The controllerof claim 10 wherein the control logic is further programmed totransition from pulse width modulation mode to six-step mode in responseto any decrease in voltage from the given voltage while maintaining thegiven speed and first given torque.
 12. The controller of claim 11wherein the control logic is further programmed to operate the electricmachine in six-step mode at the given speed and given voltage such thatthe electric machine produces a second given torque; maintain operationin six-step mode as speed and voltage decrease proportionately from thegiven speed and given voltage according to the ratio while maintainingthe second given torque; and transition from six-step mode to pulsewidth modulation mode in response to any decrease in speed from thegiven speed while maintaining the given voltage and second given torque.13. The controller of claim 12 wherein the control logic is furtherprogrammed to transition from six-step mode to pulse width modulationmode in response to any increase in voltage from the given voltage whilemaintaining the given speed and second given torque.
 14. The controllerof claim 13 wherein the first given torque and second given torque areboth greater than zero and the first given torque is greater than thesecond given torque.